package com.ecnu.sei.app.course;

import java.util.LinkedHashSet;
import java.util.Set;

import com.ecnu.sei.app.resources.Classroom;
import com.ecnu.sei.app.resources.Time;
import com.ecnu.sei.app.teacher.ITeacher;
import com.ecnu.sei.app.teacher.Official;

public class ExamInfo {
  private Set<ITeacher> proctors = new LinkedHashSet<ITeacher>();
  private int proctorNum = 4;  // required number of proctors
  private Time time = null;
  private Classroom classroom = null;
  private Official patrol = null;
  private ITeacher backup = null;
  
  public ExamInfo() {}
  
  public ExamInfo(Set<ITeacher> proctors, int proctorNum, Time time, Classroom classroom, 
      Official patrol, ITeacher backup) {
    this.proctors = proctors;
    this.proctorNum = proctorNum;
    this.time = time;
    this.classroom = classroom;
    this.patrol = patrol;
    this.backup = backup;
  }

  public Set<ITeacher> getProctor() {
    return proctors;
  }

  public int getProctorNum() {
    return proctorNum;
  }

  public Time getTime() {
    return time;
  }


  public Classroom getClassroom() {
    return classroom;
  }
  
  public Official getPatrol() {
    return patrol;
  }
 
  public ITeacher getBackup() {
    return backup;
  }
  
  public ExamInfo addProctor(Set<ITeacher> proctors) {
    proctors.addAll(proctors);
    return this;
  }
  
  public ExamInfo addProctor(ITeacher proctor) {
    proctors.add(proctor);
    return this;
  }
  
  public ExamInfo setTime(Time time) {
    this.time = time;
    return this;
  }

  public ExamInfo setClassroom(Classroom classroom) {
    this.classroom = classroom;
    return this;
  }
  
  public ExamInfo setProctorNum(int num) {
    this.proctorNum = num;
    return this;
  }
  
  public ExamInfo setPatrol(Official patrol) {
    this.patrol = patrol;
    return this;
  }
  
  public ExamInfo setBackup(ITeacher backup) {
    this.backup = backup;
    return this;
  }
}
